Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add storefront implementation #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rommelfreddy
Copy link

this pr will add error-tracking/tracing and replay for storefront.

sadly it is required to change the bundle-type to a shopware-bundle. If you have another idea get the templates into the inheritance of rendering, please let me now.

@rommelfreddy rommelfreddy force-pushed the task/add-browser-implementation branch from da46b34 to 68e6627 Compare August 26, 2024 21:45
@rommelfreddy rommelfreddy force-pushed the task/add-browser-implementation branch from 68e6627 to f64ceb5 Compare August 26, 2024 21:51
@amenk
Copy link
Contributor

amenk commented Oct 4, 2024

I have set

frosh_sentry:
    report_scheduled_tasks: true
    storefront:
        # optional: if you want track errors occurs within the browser (javascript/cors/csp)
        enabled: true
        # optional: if you want record the user sessions. Please aware the GDPR.
        replay_recording:
            enabled: true
            sample_rate: 1
        # optional: if you want measure the performance within the browser
        tracing:
            enabled: true
            sample_rate: 1
        # you should always specify a sdk version. If you do not provide any version, a hard-coded version got used. We try to keep the version up to date with the latest version, but cause the fast release-line of the javascript SDK it is recommend to update the version number regularly.
        javascript_sdk_version: "8.26.0"

but still see

tracesSampleRate: 0.1,
replaysSessionSampleRate: 0.1,

],
'tracing' => [
'enabled' => $isPerformanceTracingEnabled,
'sample_rate' => is_float($tracingSample) ? $tracingSample : 0.1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'sample_rate' => is_float($tracingSample) ? $tracingSample : 0.1,
'sample_rate' => is_numeric($tracingSample) ? $tracingSample : 0.1,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'javascript_src' => sprintf("https://browser.sentry-cdn.com/%s/%s", $jsSdkVersion, $jsFile),
'replay_recording' => [
'enabled' => $isReplayRecordingEnabled,
'sample_rate' => is_float($replaySample) ? $replaySample : 0.1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'sample_rate' => is_float($replaySample) ? $replaySample : 0.1,
'sample_rate' => is_numeric($replaySample) ? $replaySample : 0.1,

@amenk
Copy link
Contributor

amenk commented Oct 4, 2024

@shyim do you have comments on this PR?

@rommelfreddy Do you want to polish the PR (fix the phpstan issues)? If you don't have time, I believe I can fix the PHPstan issues.

Did some tests and it works well for me - would love to see this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants